package shujia.day18;

public class Student {
    private int id;
    protected String name;
    int age;
    public String address;

    private Student(){

    }

    private Student(String name){
        this.name = name;
    }


    public Student(int id){
        this.id = id;
    }

    protected Student(int id, String name){
        this.id = id;
        this.name = name;
    }


    public String fun1(){
        System.out.println("这是无参公共的方法fun1");
        return "hello world";
    }

    public void fun2(String s){
        System.out.println("这是有参公共的方法fun2");
    }

    private void fun3(){
        System.out.println("这是私有的方法fun3");
    }

    private void fun4(String s){
        System.out.println("这是私有的方法fun4");
    }


    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                '}';
    }
}
